]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notifications: Never use source icon for notifications
authorJulian Sparber <julian@sparber.net>
Wed, 6 Dec 2023 19:37:56 +0000 (20:37 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 30 Jan 2024 17:05:23 +0000 (17:05 +0000)
With the new design we will show the source icon in the header of a
notification.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>

data/theme/gnome-shell-sass/widgets/_message-list.scss
js/ui/calendar.js
js/ui/mpris.js
js/ui/notificationDaemon.js

index 0dc1ce3fe671de6a3717242b998c90dfa0d65743..15464bd80761e1bf8b9b9362879ac870e6dc076d 100644 (file)
       icon-size: $large_icon_size;
       -st-icon-style: symbolic;
     }
-
-    // fallback
-    > .fallback-app-icon {
-      width: $base_icon_size;
-      height: $base_icon_size;
-    }
   }
 
   // content
index 176d26fe2898037e80c27c44450523cfcaff62e6..e83e316545fcbd49a719bbd5030cfaeeac74b11d 100644 (file)
@@ -798,7 +798,7 @@ class NotificationMessage extends MessageList.Message {
                 icon_size: MESSAGE_ICON_SIZE,
             });
         } else {
-            return this.notification.source.createIcon(MESSAGE_ICON_SIZE);
+            return null;
         }
     }
 
index f155e377413ca8398fefb89b81487486a8828047..bf73e0ef523bccb3d523dcb3dea3faba186be9f8 100644 (file)
@@ -72,9 +72,6 @@ class MediaMessage extends MessageList.Message {
             let file = Gio.File.new_for_uri(this._player.trackCoverUrl);
             this._icon.gicon = new Gio.FileIcon({file});
             this._icon.remove_style_class_name('fallback');
-        } else if (this._player.app) {
-            this._icon.gicon = this._player.app.icon;
-            this._icon.add_style_class_name('fallback');
         } else {
             this._icon.icon_name = 'audio-x-generic-symbolic';
             this._icon.add_style_class_name('fallback');
index c0cb8acff302dee552180327c231eed74b4c3b98..d9eed69ba1224324c78584489120565e1ed72bb5 100644 (file)
@@ -212,12 +212,8 @@ class FdoNotificationDaemon {
             });
         }
 
-        // 'image-data' (or 'image-path') takes precedence over 'app-icon'.
         let gicon = this._imageForNotificationData(hints);
 
-        if (!gicon)
-            gicon = this._iconForNotificationData(appIcon);
-
         if (!gicon)
             gicon = this._fallbackIconForNotificationData(hints);
 
@@ -278,7 +274,8 @@ class FdoNotificationDaemon {
             ? MessageTray.PrivacyScope.SYSTEM
             : MessageTray.PrivacyScope.USER);
 
-        let sourceGIcon = source.useNotificationIcon ? gicon : null;
+        // Only fallback to 'app-icon' when the source doesn't have a valid app
+        const sourceGIcon = source.app ? null : this._iconForNotificationData(appIcon);
         source.processNotification(notification, sourceGIcon);
     }
 
@@ -337,8 +334,6 @@ class FdoNotificationDaemonSource extends MessageTray.Source {
 
         if (this.app)
             this.title = this.app.get_name();
-        else
-            this.useNotificationIcon = true;
 
         if (sender) {
             this._nameWatcherId = Gio.DBus.session.watch_name(sender,